<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>短信内容修改</title>
    <link href="../../layui/css/iconfont/iconfont.css" rel="stylesheet"
          type="text/css">
    <link href="../../layui/css/layui.css" rel="stylesheet" type="text/css">
    <link href="../../css/style.css" rel="stylesheet" type="text/css">
    <script src="../../layui/layui.js"></script>
    <script src="../../js/html2canvas.js"></script>
    <script src="../../js/jquery-1.8.3.js"></script>
    <script src="../../js/util.js"></script>
    <style>
        .deploy {
            background: #D8D8D8;
            box-shadow: 0px 0px 8px 0px rgba(124, 124, 124, 0.23);
            border-radius: 8px;
        }
        .hint {
            background: #FDFCEC;
            border-radius: 4px 0px 0px 0px;
            color: #F86E21;
            line-height: 28px;
            font-size: 12px;
        }
        .collocate {
            display: flex;
            color: #FFFFFF;
            line-height: 22px;
            font-size: 16px;
            margin-top: 16px;
            margin-bottom: 40px;
        }
        .phoneContent {
            width: 360px;
            height: 615px;
            margin: 0 40px;
            background: url("../../images/phoneBlack.png") no-repeat;
            background-size: 100% 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .showContent {
            background: url("../../images/phone.jpg") no-repeat;
            background-size: 100% 100%;
        }
        .phone {
            width: 330px;
            height: 455px;
            border-radius: 30px;
            display: flex;
            flex-direction: column;
            align-items: center;
            overflow-y: scroll;
            margin-top: 65px;
        }
        .unsubscribe {
            padding-left: 20px;
        }
        .unsubscribeShow {
            color: #AEAEAE;
            font-size: 12px;
            width: 100%;
            padding-left: 24px;
            margin-top: 20px;
            box-sizing: border-box;
        }
        .phone .topicalContent {
            width: 82%;
            padding: 10px;
            color: #AEAEAE;
            background: #fff;
            border: 1px solid #dee3e8;
            text-align: center;
            font-size: 12px;
            box-sizing: border-box;
        }
        .phone .signatureContent {
            width: 82%;
            padding: 10px;
            color: #AEAEAE;
            background: #fff;
            border: 1px solid #dee3e8;
            margin-top: 20px;
            text-align: center;
            font-size: 12px;
            box-sizing: border-box;
        }
        .phone::-webkit-scrollbar {
            display: none;
        }
        .phone .active {
            border-color: #36aaef;
            box-shadow: 0px 0px 4px 0px rgba(16,170,224,0.5);
        }
        .addContent textarea {
            width: 480px;
            height: 220px;
            border: 1px solid #BCBCBC;
            margin-top: 12px;
            color: #C4C4C4;
            font-size: 14px;
            padding: 5px 0 0 10px;
            border-radius: 5px;
        }
        .addContent textarea::placeholder {
            color: #C4C4C4;
            font-size: 14px;
            padding: 0 0 0 2px;
        }
        .matter {
            line-height: 35px;
            letter-spacing: 1px;
            background: url("../../images/message-bg.png") no-repeat;
            background-size: 104px 36px;
            padding-left: 10px;
            font-size: 15px;
        }
        .optionspz {
            display: flex;
            margin-top: 20px;
        }
        .optionspz .text {
            width: 55px;
            color: #7B7B7B;
            font-size: 14px;
            text-align: center;
            margin-top: 4px;
        }
        .optionpz {
            display: inline-block;
            width: 45px;
            height: 45px;
            background: #FFFFFF;
            box-shadow: 0px 0px 4px 0px rgba(184, 184, 184, 0.5);
            border-radius: 8px;
            margin-right: 35px;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .optionpz img {
            width: 30px;
        }
        .limit {
            font-weight: 600;
            color: #8E8E8E;
            line-height: 28px;
            font-size: 16px;
            margin-top: 20px;
        }
        .limitSize {
            color: #1680F9;
        }
        .topical {
            width: 96px;
            height: 22px;
            font-size: 15px;
            font-weight: 500;
            color: #8E8E8E;
            margin-top: 10px;
        }
        .topicalDetail {
            font-size: 13px;
            color: #8E8E8E;
            line-height: 22px;
        }
        .label {
            color: #E05E49;
        }
        .mesInput {
            width: 480px;
            height: 26px;
            border: 1px solid #BCBCBC;
            border-radius: 8px;
            padding-left: 10px;
        }
        .mesContent {
            position: relative;
            margin-top: 10px;
        }
        .textNum {
            position: absolute;
            right: 26px;
            color: #BCBCBC;
            font-size: 14px;
            top: 3px;
        }
        .setTitle {
            background: #36AAEF;
            letter-spacing: 1px;
            line-height: 35px;
            padding-left: 9px;
            background: url("../../images/message-bg.png") no-repeat;
            background-size: 112px 36px;
            font-size: 15px;
        }
        .layui-form-item {
            color: #333;
        }

        .mesContent input::-webkit-input-placeholder{
            color: #C4C4C4;
            font-size: 14px;
        }
        .mesContent input {
            color: #C4C4C4;
            font-size: 14px;
        }
        .layui-form-radio>i:hover, .layui-form-radioed>i {
            color: #1680F9;
        }
        .preview {
            width: 480px;
            height: 280px;
            background: #fff;
            margin-top: 15px;
            position: relative;
            text-align: center;
            border: 1px dashed #aeb8c2;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .preview p {
            color: #333;
            font-size: 14px;
            margin-top: 10px;
        }
        .addPicture, .addVideo, .addFrequency {
            position: relative;
        }
        .filePicture, .fileVideo, .fileFrequency{
            position: absolute;
            width: 20%;
            height: 20%;
            top: 50%;
            left: 50%;
            cursor: pointer;
            transform: translate(-50%, -50%);
        }
        .videoDescribe input::-webkit-input-placeholder{
            color: #C4C4C4;
            font-size: 14px;
        }
        .videoDescribe .describe {
            color: #8E8E8E;
            margin: 10px 0;
            font-size: 14px;
        }
        .videoDescribe input {
            width: 480px;
            height: 26px;
            border: 1px solid #BCBCBC;
            border-radius: 8px;
            padding-left: 10px;
            color: #8E8E8E;
        }
        .phoneText, .videoText, .pictureText, .musicText {
            width: 82%;
            color: #AEAEAE;
            background: #fff;
            border: 1px solid #dee3e8;
            margin-top: 20px;
            text-align: center;
            font-size: 12px;
            flex-grow:0;
            flex-shrink:0;
            overflow: hidden;
        }
        .phoneText {
            height: 150px;
        }
        .layui-form-checked[lay-skin=primary] i{
            border-color:#597FC0 !important;
            background-color:#FFF !important;
            color:#597FC0 !important;
            font-weight: bold;
        }
        .layui-form-checkbox[lay-skin=primary]:hover i{
            border-color:#597FC0 !important;
        }
        .layui-form-radio>i:hover, .layui-form-radioed>i{
            color: #597FC0 !important;
        }
        .pictureText, .videoText, .musicText {
            line-height: 150px;
        }
        .item {
            position: relative;
        }
        .itembg {
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,.6);
            color: #fff;
            z-index: 11;
        }
        .itembg img {
            position: absolute;
            width: 20px;
            height: auto;
            bottom: 8px;
            right: 20px;
            cursor: pointer;
        }
        .addText {
            display: inline-block;
            width: 100%;
            word-break: break-all;
        }
        .layui-form-select dl dd.layui-this {
            background-color: #1E9FFF;
            color: #fff;
        }
        .configOption {
            margin-right: 20px;
        }
        .addText {
            display: inline-block;
            width: 100%;
            word-break: break-all;
        }
        .check {
            background: #1E9FFF;
            color: #fff;
            padding: 6px;
            font-size: 12px;
            border-radius: 10px;
            margin-left: 5px;
            cursor: pointer;
        }
        .phoneBottom {
            color: #333;
            margin-top: 16px;
            font-size: 13px;
        }
        .outputPicture {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .showPicture {
            margin: 0;
        }
        .demo-class {
            background-color: transparent!important;
            box-shadow: none!important;
        }
        .ylpictureText, .ylvideoText, .ylmusicText {
            line-height: 0;
        }
        .ylvideoText {
            position: relative;
        }
        .play {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100px;
            height: auto;
        }
        .tip {
            width: 82%;
            color: red;
            font-size: 12px;
            margin-bottom: 10px;
            transform: scale(0.8);
        }
        .showContent  .phoneText,
        .showContent  .videoText,
        .showContent  .pictureText,
        .showContent  .musicText {
            overflow: hidden;
            height: 150px;
        }
        .layui-layer-page .layui-layer-content::-webkit-scrollbar {
            display: none;
        }
    </style>
    <script type="text/javascript">
        layui.use(['layer','laydate', 'form', 'jquery', 'element','upload'], function () {
            var table = layui.table;
            var layer = layui.layer;
            var upload = layui.upload;
            var form = layui.form;
            var $ = layui.$;
            var laydate=layui.laydate;
            var mgrId=getUrlParam("mgrId");
            var cityId=getUrlParam("cityId");
            var phoneTextIndex = "";
            var pictureTextIndex = "";
            var videoTextIndex = "";
            var musicTextIndex = "";
            var textNum39 = '';
            var textNum40 = '';
            var bytenum = 0;
            var modeId = "";
            laydate.render({
                elem: '#effectTime'
                , type: 'datetime'
                , btns: ['clear', 'confirm']
            });
            //页面数据初始化
            $(document).ready(function () {
                $(".addSignature").hide();
                $(".items").hide();
            });

            //查看短信条数
            $('#qryContentCount').on('click', function () {
                $('#contentCount').show();

                var param;
                var content = $("#newContent").val();
                var url;
                var isThreshold = 0;
                var threshold = 0;
                var cycleThreshold = 0;
                var cycle=0;
                var url1="/template2/findTemplate";
                var param1 = {
                    mgrId: mgrId
                };
                $.ajax({
                    type: 'post',
                    async: false,
                    url: url1,
                    data: param1,
                    beforeSend: function () {
                        loading = layer.load(0, {shade: false});
                    },
                    success: function (json) {
                        layer.close(loading);
                        var data;
                        if(json.code==0){
                            data = json.data;
                            isThreshold=data.isThreshold;
                            threshold=data.threshold;
                            cycleThreshold=data.cycleThreshold;
                            cycle=data.cycle;
                        }else {
                            layer.msg(json.msg);
                        }
                    },
                    error: function (data) {
                        layer.msg('系统异常，请联系管理员处理!');
                    }
                });

                if(isNull(content)){
                    layer.msg("新短信内容为空！");
                    return false;
                }else{
                    url="/util/contentCount";
                    param={
                        content : content
                    };

                    $.ajax({
                        type: 'post',
                        data: param,
                        url: url,
                        beforeSend: function () {
                            loading = layer.load(0, {shade: false});
                        },
                        success: function (json) {
                            layer.close(loading);
                            if (json.code == 0) {
                                $("#contentNum").html(json.data);
                                $("#contentLength").html(content.length);
                                if(isThreshold==1){
                                    $("#thresholdNum").html(" , 总计将发送："+(json.data)*threshold+"  条");
                                }else if(isThreshold==2 &&cycle==1){
                                    $("#thresholdNum").html(" , 每年将发送："+(json.data)*cycleThreshold+"  条");
                                }else if(isThreshold==2 &&cycle==2){
                                    $("#thresholdNum").html(" , 每月将发送："+(json.data)*cycleThreshold+"  条");
                                }else if(isThreshold==2 &&cycle==3){
                                    $("#thresholdNum").html(" , 每周将发送："+(json.data)*cycleThreshold+"  条");
                                }else if(isThreshold==2 &&cycle==4){
                                    $("#thresholdNum").html(" , 每天将发送："+(json.data)*cycleThreshold+"  条");
                                }else if(isThreshold==3 &&cycle==1){
                                    $("#thresholdNum").html(" , 总计将发送："+(json.data)*threshold+"  条 , 每年将发送："+(json.data)*cycleThreshold+"  条");
                                }else if(isThreshold==3 &&cycle==2){
                                    $("#thresholdNum").html(" , 总计将发送："+(json.data)*threshold+"  条 , 每月将发送："+(json.data)*cycleThreshold+"  条");
                                }else if(isThreshold==3 &&cycle==3){
                                    $("#thresholdNum").html(" , 总计将发送："+(json.data)*threshold+"  条 , 每周将发送："+(json.data)*cycleThreshold+"  条");
                                }else if(isThreshold==3 &&cycle==4){
                                    $("#thresholdNum").html(" , 总计将发送："+(json.data)*threshold+"  条 , 每天将发送："+(json.data)*cycleThreshold+"  条");
                                }



                            } else {
                                layer.msg(json.msg);
                            }
                        }

                    });

                    $('#contentCount').show();
                }


            });

            //表单提交
            form.on('submit(commit)', function (data) {
                if($(".topicalContent").eq(0).text() == "未添加主题") {
                    layer.msg("未添加主题");
                }else if($(".signatureContent").eq(0).text() == "未添加签名") {
                    layer.msg("未添加签名");
                }else {
                    let uploadFileOrderBo = [];
                    let j = 2;
                    let flag = true;
                    for(let i=0;i<$(".item").length-2;i++) {
                        if($(".item")[j+i].classList[0] == "phoneText") {
                            if($($(".item").eq(i+j).children(0)).text() == "添加文本") {
                                layer.msg("有文本项未配置");
                                flag = false;
                                return
                            }else {
                                uploadFileOrderBo.push({
                                    "type": "1",
                                    "fileName": "",
                                    "orderId": i,
                                    "content": $($(".item").eq(i+j).children(0)).text()
                                })
                            }
                        }else if($(".item")[j+i].classList[0] == "pictureText") {
                            if($($(".item")[j+i].lastChild).attr("src") == undefined) {
                                layer.msg("有图片项未配置");
                                flag = false;
                                return
                            }else {
                                let index = $($(".item")[j+i].lastChild).attr("src").lastIndexOf("/");
                                uploadFileOrderBo.push({
                                    "type": "2",
                                    "fileName": $($(".item")[j+i].lastChild).attr("src").substring(index+1),
                                    "orderId": i,
                                    "content": ""
                                })
                            }
                        }else if($(".item")[j+i].classList[0] == "videoText") {
                            if($($(".item")[j+i].lastChild).attr("src") == undefined) {
                                layer.msg("有视频项未配置");
                                flag = false;
                                return
                            }else {
                                let index = $($(".item")[j+i].lastChild).attr("src").lastIndexOf("/");
                                uploadFileOrderBo.push({
                                    "type": "3",
                                    "fileName": $($(".item")[j+i].lastChild).attr("src").substring(index+1),
                                    "orderId": i,
                                    "content": ""
                                })
                            }
                        }else if($(".item")[j+i].classList[0] == "musicText") {
                            if($($(".item")[j+i].lastChild).attr("src") == "undefined") {
                                layer.msg("有音频项未配置");
                                flag = false;
                                return
                            }else {
                                let index = $($(".item")[j+i].lastChild).attr("src").lastIndexOf("/");
                                uploadFileOrderBo.push({
                                    "type": "4",
                                    "fileName": $($(".item")[j+i].lastChild).attr("src").substring(index+1),
                                    "orderId": i,
                                    "content": ""
                                })
                            }
                        }
                    }
                    let param = {
                        "modeId": modeId,
                        "mgrId": mgrId,
                        "topic": $(".topicalContent").eq(0).text().substring(5),
                        "signId": $("#signature").val(),
                        "uploadFileOrderBo": uploadFileOrderBo
                    };
                    $.ajax({
                        type: 'post',
                        async: false,
                        data: JSON.stringify(param),
                        url: '/template/update5GTemplateSync',
                        contentType:"application/json;charset=UTF-8",
                        success: function (obj) {
                            if(obj.retCode==0){
                                layer.confirm('修改成功', {
                                    btn: ['确定'] //按钮
                                }, function (index) {
                                    layer.close(index);
                                    location.href="../templateManage/smsTemplateManage2.html";
                                });
                            }else{
                                layer.confirm(obj.retMsg, {
                                    btn: ['确定'] //按钮
                                }, function () {
                                    location.href="../templateManage/smsTemplateManage2.html";
                                });
                            }
                        },
                        error: function(){
                            layer.msg('系统异常，请联系管理员处理!');
                        }
                    });

                }
                return false;
            });
            //短信配置项添加
            $(".optionpz").click(function() {
                var optionIndex = $(".optionpz").index(this);
                $(".addTopical").hide();
                $(".addSignature").hide();
                $(".items").hide();
                $(".items").eq(optionIndex).show();
                phoneTextIndex = "";
                pictureTextIndex = "";
                videoTextIndex = "";
                musicTextIndex = "";
                //添加文本
                $(".item").removeClass("active");
                if(optionIndex == 0) {
                    $("#messageTextarea").val("");
                    $(".phone").eq(0).append("<div class='phoneText item active'><span class='addText'>添加文本</span><div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div></div>");
                    $("#fileSize").text(parseInt($("#fileSize").text()) + 1);
                }else if(optionIndex == 1) {
                    $(".phone").eq(0).append("<div class='pictureText item active'><span>上传图片</span><div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div></div>");
                    $(".addPicture").eq(0).html("<i class=\"layui-icon\" style=\"font-size: 30px; color: #333;\">&#xe654;</i>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t<p>上传图片</p>");
                }else if(optionIndex == 2) {
                    $(".phone").eq(0).append("<div class='videoText item active'><span>上传视频</span><div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div></div>");
                    $(".addVideo").eq(0).html("<i class=\"layui-icon\" style=\"font-size: 30px; color: #333;\">&#xe654;</i>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t<p>上传视频</p>");
                }else if(optionIndex == 3) {
                    $(".phone").eq(0).append("<div class='musicText item active'><span>上传音频</span><div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div></div>");
                    $(".addFrequency").eq(0).html("<i class=\"layui-icon\" style=\"font-size: 30px; color: #333;\">&#xe654;</i>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t<p>上传音频</p>");
                }
                //$(".active")[0].animate({scrollBottom:$(".active")[0].scrollHeight},'1000');
                $(".phone").eq(0).scrollTop(150 * $(".item").length);
            });
            $(".phone").on('click','.item',function() {
                // var pictureTextIndex = 0;
                // var videoTextIndex = 0;
                // var musicTextIndex = 0;
                var type = $(this).attr('class');
                $(".addTopical").hide();
                $(".addSignature").hide();
                if(type.indexOf("phoneText") != -1) {
                    phoneTextIndex = $(".phoneText").index(this);
                    $(".items").hide();
                    $(".items").eq(0).show();
                    if($(this).text() == "添加文本") {
                        $("#messageTextarea").val("");
                    }else {
                        $("#messageTextarea").val($(this).text());
                    }
                }else if(type.indexOf("pictureText") != -1) {
                    pictureTextIndex = $(".pictureText").index(this);
                    var pictureSrc = $($(this).children()[1]).attr("src");
                    if(pictureSrc) {
                        $(".addPicture").eq(0).html("<img src="+"'"+pictureSrc+"'" +"style='max-width: 100%;max-height: 280px'>");
                    }else {
                        $(".addPicture").eq(0).html("<i class=\"layui-icon\" style=\"font-size: 30px; color: #333;\">&#xe654;</i>\n" +
                            "\t\t\t\t\t\t\t\t\t\t\t\t<p>上传图片</p>");
                    }
                    $(".items").hide();
                    $(".items").eq(1).show();
                }else if(type.indexOf("videoText") != -1) {
                    videoTextIndex = $(".videoText").index(this);
                    var videoSrc = $($(this).children()[1]).attr("src");
                    if($($(this).children()[1]).attr("src")) {
                        $(".addVideo").eq(0).html("<video src="+"'"+videoSrc+"'" +"style='max-width: 100%;max-height: 280px' controls>");
                    }else {
                        $(".addVideo").eq(0).html("<i class=\"layui-icon\" style=\"font-size: 30px; color: #333;\">&#xe654;</i>\n" +
                            "\t\t\t\t\t\t\t\t\t\t\t\t<p>上传视频</p>");
                    }
                    $(".items").hide();
                    $(".items").eq(2).show();
                }else if(type.indexOf("musicText") != -1) {
                    musicTextIndex = $(".musicText").index(this);
                    var audioSrc = $($(this).children()[1]).attr("src");
                    if($($(this).children()[1]).attr("src")) {
                        $(".addFrequency").eq(0).html("<audio src="+"'"+ audioSrc +"'" +"style='max-width: 350px;max-height:152px;' controls>");                    }else {
                        $(".addFrequency").eq(0).html("<i class=\"layui-icon\" style=\"font-size: 30px; color: #333;\">&#xe654;</i>\n" +
                            "\t\t\t\t\t\t\t\t\t\t\t\t<p>上传音频</p>");
                    }
                    $(".items").hide();
                    $(".items").eq(3).show();
                }else if(type.indexOf("topicalContent") != -1) {
                    if($(".topicalContent").text() != "未添加主题") {
                        $(".mesInput").val($(".topicalContent").text().slice(5));
                    }
                    $(".items").hide();
                    $(".addTopical").show();
                }else if(type.indexOf("signatureContent") != -1) {
                    $(".items").hide();
                    $(".addSignature").show();
                }
                $(".item").removeClass("active");
                $(this).addClass("active");
            });
            $(".phone").on('mouseover','.item',function() {
                $(this).children(".itembg").css("display", "block");
            });
            //点击添加项删除按钮
            $(".phone").on('click','.delete',function(event) {
                if($(this).parent().next().attr("src")  || $(this).parent().prev().attr("src")) {
                    let index = "";
                    let filePath = "";
                    if($(this).parent().next().attr("src")) {
                        index = $(this).parent().next().attr("src").lastIndexOf("/");
                        filePath = $(this).parent().next().attr("src");
                    }else if($(this).parent().prev().attr("src")) {
                        index = $(this).parent().prev().attr("src").lastIndexOf("/");
                        filePath = $(this).parent().prev().attr("src");
                    }
                    $.ajax({
                        type: 'post',
                        async: false,
                        url: '/upload/delete',
                        data: {
                            "mgrId": mgrId,
                            "filePath": filePath.substring(index+1)
                        },
                        success: function (json) {
                            if(json.retCode == 0) {
                                $("#fileSize").text(parseInt($("#fileSize").text()) - parseInt(json.data));
                                $(this).parent().parent().remove();
                                $(".items").hide();
                                event.stopPropagation();
                            }else {
                                layer.msg(json.msg);
                            }
                        }.bind(this), error: function () {
                            layer.msg('系统异常，请联系管理员处理!');
                        }
                    });
                }else {
                    if($(this).parent().parent().hasClass('phoneText')) {
                        $("#fileSize").text(parseInt($("#fileSize").text()) - 1);
                    }
                    $(this).parent().parent().remove();
                    $(".items").hide();
                    event.stopPropagation();
                }
            });
            $(".phone").on('mouseleave','.item',function() {
                $(this).children(".itembg").css("display", "none");
            });
            //监听文本内容输入
            $('#messageTextarea').on('input', function(e){
                if(phoneTextIndex === "") {
                    if(e.delegateTarget.value == "") {
                        $(".phoneText:last").children("span").text("添加文本");
                    }else  {
                        $(".phoneText:last").children("span").text(e.delegateTarget.value);
                    }
                }else {
                    if(e.delegateTarget.value == "") {
                        $(".phoneText").eq(phoneTextIndex).children("span").text("添加文本");
                    }else  {
                        $(".phoneText").eq(phoneTextIndex).children("span").text(e.delegateTarget.value);
                    }
                }
            });
            //添加主题
            $(".topicalContent").eq(0).click(function() {
                $(".items").hide();
                $(".addTopical").show();
            });
            $("#mesInput").blur(function(e) {
                e.delegateTarget.value = e.delegateTarget.value.replace("/","");
                e.delegateTarget.value = e.delegateTarget.value.replace(">","");
                e.delegateTarget.value = e.delegateTarget.value.replace("<","");
                e.delegateTarget.value = e.delegateTarget.value.replace("!","");
                e.delegateTarget.value = e.delegateTarget.value.replace("'","");
                e.delegateTarget.value = e.delegateTarget.value.replace("alert","");
                e.delegateTarget.value = e.delegateTarget.value.replace("../","");
                e.delegateTarget.value = e.delegateTarget.value.replace("./","");
                e.delegateTarget.value = e.delegateTarget.value.replace("script","");
                if(e.delegateTarget.value.trim() == "") {
                    $(".topicalContent").eq(0).text("未添加主题");
                }else {
                    $(".topicalContent").eq(0).text("短信主题：" + e.delegateTarget.value);
                }
            });
            //视频上传
            // $("#fileVideo").on("change",function(){
            // 	var obj=$("#fileVideo")[0].files[0];
            // 	var fr=new FileReader();
            // 	fr.onload=function () {
            // 		$("#fileVideo").attr('src',this.result);
            // 		console.log(this.result);
            // 		$("#avatar").val(this.result);
            // 	};
            // });
            //是否退订
            form.on('checkbox(tuid)', function(data){
                if(data.elem.checked==true){
                    $(".phone").eq(0).append("<div class='unsubscribeShow'>退订回复T</div>");
                }else{
                    $(".unsubscribeShow").remove();
                }
            });
            //图片上传
            var uploadInst1 = upload.render({
                elem: '.uploadPicture' //绑定元素
                ,url: "/upload/templateFile" //上传接口
                ,accept:'images'
                ,exts:'jpg|jpeg|png|bmp|gif'
                ,multiple: true
                ,size: 2*1024*1024
                ,before: function (obj){
                    this.data = {mgrId: mgrId,type: "2"};
                    obj.preview(function(index, file, result){
                        $("#fileSize").text(parseInt(parseInt(file.size)/1024) + parseInt($("#fileSize").text()));
                    });
                }
                ,done: function(res, index, upload){
                    let path = $(".addPicture:first-child").children("img").attr("src");
                    if(path) {
                        let index = path.lastIndexOf("/");
                        $.ajax({
                            type: 'post',
                            async: false,
                            url: '/upload/delete',
                            data: {
                                "mgrId": mgrId,
                                "filePath": path.substring(index+1)
                            },
                            success: function (json) {
                                if(json.retCode == 0) {
                                    $("#fileSize").text(parseInt($("#fileSize").text()) - parseInt(json.data));
                                }else {
                                    layer.msg(json.msg);
                                }
                            }.bind(this), error: function () {
                                layer.msg('系统异常，请联系管理员处理!');
                            }
                        });
                    }
                    if(pictureTextIndex === "") {
                        $(".pictureText:last").html("<div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><img src="+"'../../images/test/"+res.data +"'" +"style='height: 100%;'>");
                        $(".addPicture").eq(0).html("<img src="+"'../../images/test/"+res.data +"'" +"style='max-width: 100%;max-height: 280px;'>");
                    }else {
                        $(".pictureText").eq(pictureTextIndex).html("<div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><img src="+"'../../images/test/"+res.data +"'" +"style='height: 100%'>");
                        $(".addPicture").eq(0).html("<img src="+"'../../images/test/"+res.data +"'" +"style='max-width: 100%;max-height: 280px;'>");
                    }
                }
                ,error: function(index, upload){
                }
            });
            //视频上传
            var uploadInst2 = upload.render({
                elem: '.uploadVideo' //绑定元素
                ,url: "/upload/templateFile" //上传接口
                ,accept:'video'
                // ,exts:'jpg|jpeg|png|bmp|gif'
                ,multiple: true
                ,size: 2*1024*1024
                ,before: function (obj){
                    this.data = {mgrId: mgrId,type: "3"};
                    obj.preview(function(index, file, result){
                        $("#fileSize").text(parseInt(parseInt(file.size)/1024) + parseInt($("#fileSize").text()));
                    });
                }
                ,done: function(res, index, upload){
                    let path = $(".addVideo:first-child").children("video").attr("src");
                    if(path) {
                        let index = path.lastIndexOf("/");
                        $.ajax({
                            type: 'post',
                            async: false,
                            url: '/upload/delete',
                            data: {
                                "mgrId": mgrId,
                                "filePath": path.substring(index+1)
                            },
                            success: function (json) {
                                if(json.retCode == 0) {
                                    $("#fileSize").text(parseInt($("#fileSize").text()) - parseInt(json.data));
                                }else {
                                    layer.msg(json.msg);
                                }
                            }.bind(this), error: function () {
                                layer.msg('系统异常，请联系管理员处理!');
                            }
                        });
                    }
                    if(videoTextIndex === "") {
                        $(".videoText:last").html("<div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><video src="+"'../../images/test/"+res.data +"'" +"style='width: 100%;' controls>");
                        $(".addVideo").eq(0).html("<video src="+"'../../images/test/"+res.data +"'" +"style='max-width: 100%;max-height: 280px;' controls>");
                    }else {
                        $(".videoText").eq(videoTextIndex).html("<div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><video src="+"'../../images/test/"+res.data +"'" +"style='width: 100%;' controls>");
                        $(".addVideo").eq(0).html("<video src="+"'../../images/test/"+res.data +"'" +"style='max-width: 100%;max-height: 280px;' controls>");
                    }
                }
                ,error: function(index, upload){
                }
            });
            //音频上传
            var uploadInst3 = upload.render({
                elem: '.uploadAudio' //绑定元素
                ,url: "/upload/templateFile" //上传接口
                ,accept:'audio'
                // ,exts:'jpg|jpeg|png|bmp|gif'
                ,multiple: true
                ,size: 2*1024*1024
                ,before: function (obj){
                    this.data = {mgrId: mgrId,type: "4"};
                    obj.preview(function(index, file, result){
                        $("#fileSize").text(parseInt(parseInt(file.size)/1024) + parseInt($("#fileSize").text()));
                    });
                }
                ,done: function(res, index, upload){
                    let path = $(".addFrequency:first-child").children("audio").attr("src");
                    if(path) {
                        let index = path.lastIndexOf("/");
                        $.ajax({
                            type: 'post',
                            async: false,
                            url: '/upload/delete',
                            data: {
                                "mgrId": mgrId,
                                "filePath": path.substring(index+1)
                            },
                            success: function (json) {
                                if(json.retCode == 0) {
                                    $("#fileSize").text(parseInt($("#fileSize").text()) - parseInt(json.data));
                                }else {
                                    layer.msg(json.msg);
                                }
                            }.bind(this), error: function () {
                                layer.msg('系统异常，请联系管理员处理!');
                            }
                        });
                    }
                    if(musicTextIndex === "") {
                        $(".musicText:last").html("<div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><audio src="+"'../../images/test/"+res.data +"'" +"style='width: 100%;' controls>");
                        $(".addFrequency").eq(0).html("<audio src="+"'../../images/test/"+res.data +"'" +"style='width: 350px;max-height:152px;' controls>");
                    }else {
                        $(".musicText").eq(musicTextIndex).html("<div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><audio src="+"'../../images/test/"+res.data +"'" +"style='width: 100%;' controls>");
                        $(".addFrequency").eq(0).html("<audio src="+"'../../images/test/"+res.data +"'" +"style='max-width: 350px;max-height:152px;' controls>");
                    }
                }
                ,error: function(index, upload){
                }
            });
            //签名选择
            form.on('select(signature)', function(data){
                if($("#signature option:selected").text() == "请选择") {
                    $(".signatureContent").eq(0).html("未添加签名");
                }else {
                    $(".signatureContent").eq(0).html("短信签名：" + $("#signature option:selected").text());
                }
            });
            $.ajax({
                type : 'post',
                data :  JSON.stringify({"checkState": "1", "state": "1"}),
                async : false,
                url : "/signatureManage/qrySignatureList2",
                contentType:"application/json;charset=UTF-8",
                success : function(data) {
                    //签名下拉框
                    if(data.retCode == 0) {
                        var signatureOptions= '<option value="">请选择</option>';
                        for(var i=0 ; i<data.data.length ; i++){
                            signatureOptions += '<option value="' + data.data[i].signId + '">' + data.data[i].signName + '</option>';
                            $('#signature').html(signatureOptions);
                        }
                        form.render();
                    }
                },
                complete : function() {},
                error : function(data) {
                    layer.msg('系统异常，请联系管理员处理!');
                }
            });
            $.ajax({
                type: 'post',
                async: false,
                data: {"mgrId": mgrId},
                url: '/template/qry5GTemplateInfo',
                //contentType:"application/json;charset=UTF-8",
                success: function (obj) {
                    if(obj.retCode==0){
                        $("#signature").val(obj.data.signId);
                        modeId = obj.data.modeId;
                        let items = obj.data.uploadFileInfoList;
                        $(".phone").eq(0).append("<div class='topicalContent item'>短信主题:"+ obj.data.topic +"</div>");
                        $(".phone").eq(0).append("<div class='signatureContent item'>短信签名:"+ obj.data.signName +"</div>");
                        for(let i=0;i<items.length;i++) {
                            if(items[i].type == 1) {
                                $(".phone").eq(0).append("<div class='phoneText item'><span class='addText' src="+"'../../images/test/"+items[i].fileName+"'>"+ items[i].content +"</span><div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div></div>");
                            }else if(items[i].type == 2) {
                                $(".phone").eq(0).append("<div class='pictureText item'><div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><img src="+"'../../images/test/"+items[i].fileName +"'" +"style='height: 100%;'></div>")
                            }else if(items[i].type == 3) {
                                $(".phone").eq(0).append("<div class='videoText item'><div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><video src="+"'../../images/test/"+items[i].fileName +"'" +"style='width: 100%;' controls></div>");
                            }else if(items[i].type == 4) {
                                $(".phone").eq(0).append("<div class='musicText item'><div class='itembg' style='display: none'><img class='delete' src='../../images/deleteOption.png' alt=''></div><audio src="+"'../../images/test/"+items[i].fileName +"'" +"style='width: 100%;' controls></div>");
                            }
                        }
                        $("#fileSize").text(obj.data.allFileSize);
                        $(".signature").val(obj.data.signId);
                        //$("#phone").scrollTop($("#phone").prop("scrollHeight"));
                        //$("#phone").scrollTop(200);
                    }else{
                        layer.msg(obj.retMsg);
                    }
                },
                error: function(){
                    layer.close(index);
                    layer.msg('系统异常，请联系管理员处理!');
                }
            });
            //点击预览
            $(".check").click(function() {
                if($(".topicalContent").eq(0).text() == "未添加主题") {
                    layer.msg('<p style="color:black;background: #fff">未添加主题</p>', {icon: 2,time: 1000});
                    return;
                }else if($(".signatureContent").eq(0).text() == "未添加签名") {
                    layer.msg('<p style="color:black;background: #fff">未添加签名</p>', {icon: 2,time: 1000});
                    return;
                }
                let videos = $(".phone video");
                let videosArray = [];
                for(let i=0;i<videos.length;i++) {
                    let video = videos[i];
                    let canvas = document.createElement("canvas");
                    let img = document.createElement("img");
                    let ctx = canvas.getContext("2d");
                    canvas.width = video.videoWidth;
                    canvas.height = video.videoHeight;
                    ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
                    img.src = canvas.toDataURL();
                    videosArray.push(canvas.toDataURL())
                }
                let j = 2;
                let flag = true;
                let uploadFileOrderBo = [];
                for(let i=0;i<$(".item").length-2;i++) {
                    if($(".item")[j+i].classList[0] == "phoneText") {
                        if($($(".item").eq(i+j).children(0)).text() == "添加文本") {
                            layer.msg('<p style="color:black;background: #fff">有文本项未配置</p>', {icon: 2,time: 1000});
                            flag = false;
                            return
                        }else {
                            uploadFileOrderBo.push({
                                "type": "1",
                                "fileName": "",
                                "orderId": i,
                                "content": $($(".item").eq(i+j).children(0)).text()
                            })
                        }
                    }else if($(".item")[j+i].classList[0] == "pictureText") {
                        if($($(".item")[j+i].lastChild).attr("src") == undefined) {
                            layer.msg('<p style="color:black;background: #fff">有图片项未配置</p>', {icon: 2,time: 1000});
                            flag = false;
                            return
                        }else {
                            let index = $($(".item")[j+i].lastChild).attr("src").lastIndexOf("/");
                            uploadFileOrderBo.push({
                                "type": "2",
                                "fileName": $($(".item")[j+i].lastChild).attr("src").substring(index+1),
                                "orderId": i,
                                "content": ""
                            })
                        }
                    }else if($(".item")[j+i].classList[0] == "videoText") {
                        if($($(".item")[j+i].lastChild).attr("src") == undefined) {
                            layer.msg('<p style="color:black;background: #fff">有视频项未配置</p>', {icon: 2,time: 1000});
                            flag = false;
                            return
                        }else {
                            let index = $($(".item")[j+i].lastChild).attr("src").lastIndexOf("/");
                            uploadFileOrderBo.push({
                                "type": "3",
                                "fileName": $($(".item")[j+i].lastChild).attr("src").substring(index+1),
                                "orderId": i,
                                "content": ""
                            })
                        }
                    }else if($(".item")[j+i].classList[0] == "musicText") {
                        if($($(".item")[j+i].lastChild).attr("src") == "undefined") {
                            layer.msg('<p style="color:black;background: #fff">有音频项未配置</p>', {icon: 2,time: 1000});
                            flag = false;
                            return
                        }else {
                            let index = $($(".item")[j+i].lastChild).attr("src").lastIndexOf("/");
                            uploadFileOrderBo.push({
                                "type": "4",
                                "fileName":  $($(".item")[j+i].lastChild).attr("src").substring(index+1),
                                "orderId": i,
                                "content": ""
                            })
                        }
                    }
                }
                let content = "";
                content = "<div class='topicalContent' style='text-align: left'>短信主题:"+ $(".topicalContent").eq(0).text().substring(5)  +"</div>";
                content = content + "<div class='signatureContent' style='text-align: left'>短信签名:"+ $(".signatureContent").eq(0).text().substring(5) +"</div>";
                for(let i=0;i<uploadFileOrderBo.length;i++) {
                    if(uploadFileOrderBo[i].type == "1") {
                        content += "<div class='phoneText'><span class='addText' style='text-align: left;padding: 10px;box-sizing: border-box;'>"+ uploadFileOrderBo[i].content +"</span></div>"
                    }else if(uploadFileOrderBo[i].type == "2") {
                        content += "<div class='pictureText ylpictureText'><img src="+"'../../images/test/"+ uploadFileOrderBo[i].fileName+"'" +"style='width: 100%'></div>"
                    }else if(uploadFileOrderBo[i].type == "4") {
                        content += "<div class='musicText ylmusicText'><audio src="+"'../../images/test/"+ uploadFileOrderBo[i].fileName+"'" +"style='width: 100%' controls></div>"
                    }else if(uploadFileOrderBo[i].type == "3") {
                        content += "<div class='videoText ylvideoText'><video src="+"'../../images/test/"+ uploadFileOrderBo[i].fileName+"'" +"style='width: 100%' controls></div>"
                    }
                }
                content = "<div class='phoneContent showPicture'><div class='phone'><div class='outputPicture'>"+content+"</div></div></div>";
                let contents = "";
                contents = "<div class='tip'>注：导出长图仅供参考，实际效果以终端显示为准</div><div class='topicalContent' style='text-align: left'>"+ $(".topicalContent").eq(0).text() +"</div>";
                contents = contents + "<div class='signatureContent' style='text-align: left'>"+ $(".signatureContent").eq(0).text() +"</div>";
                let k = 0;
                for(let i=0;i<uploadFileOrderBo.length;i++) {
                    if(uploadFileOrderBo[i].type == "1") {
                        contents += "<div class='phoneText'><span class='addText' style='text-align: left;padding: 10px;box-sizing: border-box;'>"+ uploadFileOrderBo[i].content +"</span></div>"
                    }else if(uploadFileOrderBo[i].type == "2") {
                        contents += "<div class='pictureText ylpictureText'><img src="+"'../../images/test/"+ uploadFileOrderBo[i].fileName+"'" +"style='width: 100%'></div>"
                    }else if(uploadFileOrderBo[i].type == "4") {
                        contents += "<div class='musicText ylmusicText'><img src='../../images/audio.png' style='width: 100%'></div>"
                    }else if(uploadFileOrderBo[i].type == "3") {
                        contents += "<div class='videoText ylvideoText'><img class='play' src='../../images/play.png'><img src="+ videosArray[k] +" style='width: 100%'></div>";
                        k++;
                    }
                }
                //contents = "<div class='phoneContent showPicture'><div class='phone'><div class='outputPictures'>"+contents+"</div></div></div>";
                var layeros = "";
                layer.open({
                    type: 1
                    ,skin: 'demo-class'
                    , title: false //不显示标题栏
                    , closeBtn: false
                    , area: '353px;'
                    , shade: 0.8
                    , id: 'LAY_layuipro' //设定一个id，防止重复弹出
                    , btn: ['导出', '关闭']
                    , btnAlign: 'c'
                    , moveType: 1 //拖拽模式，0或者1
                    , content: content
                    , success: function (layero) {
                        layeros = layero;
                    },btn1: function() {
                        $("body").append("<div>"+ $(".outputPicture").html() +"</div>");
                        $(".outputPicture").html(contents);
                        $(".outputPicture").parent().scrollTop(0);
                        var btn = layeros.find('.layui-layer-btn');
                        html2canvas(document.getElementsByClassName("outputPicture")[0], {
                            allowTaint: true,
                            taintTest: false,
                            useCORS: true,
                            onrendered: function(canvas) {
                                canvas.id = "mycanvas";
                                //生成base64图片数据
                                var dataUrl = canvas.toDataURL();
                                $("#output").attr("href",dataUrl);
                                btn.find('.layui-layer-btn0').attr({
                                    href: dataUrl
                                    ,download: 'phone.jpeg'
                                });
                            }
                        });
                    }
                })
            });
        });
    </script>
</head>
<body>
<!--nav-->
<div class="layui-html-limit">

    <!--container-->
    <div class="layui-content-body">
        <div class="scroll-box">
            <div class="breadcrumb-box">
					<span class="layui-breadcrumb" lay-separator="|"> <a
                            href="javascript:returnIndex2()">首页&nbsp;</a> <a
                            href="../templateManage/smsTemplateManage2.html">
							&nbsp;短信项目模板配置管理&nbsp; </a> <a href=""> &nbsp;短信内容修改&nbsp; </a>
					</span>
            </div>
            <div class="deploy">
                <div class="hint">
                    建议上传2MB以内的视频文件，【视频格式】为3gp、mp4、amr、mpeg的格式文件；上传时，请添加视频描述信息，不可为空。
                </div>
            </div>
            <div class="collocate" enctype="multipart/form-data">
                <div class="phoneContent showContent">
                    <div class="phone" id="phone"></div>
                    <div class="phoneBottom">
                        <span>预计文件大小:</span>
                        <span id="fileSize">0</span><span>k</span>
                        <span class="check">点击预览</span>
                    </div>
                </div>
                <div class="configOption">
                    <div class="matter">添加素材</div>
                    <div class="optionspz">
                        <div>
                            <div class="optionpz">
                                <img src="../../images/text.png" alt="">
                            </div>
                            <div class="text">文本</div>
                        </div>
                        <div>
                            <div class="optionpz">
                                <img src="../../images/picture.png" alt="">
                            </div>
                            <div class="text">图片</div>
                        </div>
                        <div>
                            <div class="optionpz">
                                <img src="../../images/video.png" alt="">
                            </div>
                            <div class="text">视频</div>
                        </div>
                        <div>
                            <div class="optionpz">
                                <img src="../../images/music.png" alt="">
                            </div>
                            <div class="text">音频</div>
                        </div>
                    </div>
                    <!--            <div class="size">-->
                    <!--                <span>预计文件大小：</span>-->
                    <!--                <span>0k</span>-->
                    <!--            </div>-->
                    <div class="limit">
									<span>
										内容上限为 <span class="limitSize">2M</span>；平台向所有终端设备统一。
									</span>
                    </div>
                    <div class="addTopical">
                        <div class="topical">添加短信主题</div>
                        <div class="topicalDetail">
                            <div><span class="label">* </span>短信主题将作为短信内容展示，出现在终端的头部；</div>
                            <div><span class="label">* </span>视频短信标题允许输入的长度不超过20，且不允许输入如下特殊字符</div>
                            <div>/ > < ! '& script../ ./ alert</div>
                        </div>
                        <div class="mesContent">
                            <input class="mesInput" id="mesInput" type="text" placeholder="请输入...长度不超过20" maxlength="20">
                        </div>
                    </div>
                    <div class="addSignature">
                        <div class="topical">添加签名</div>
                        <div class="topicalDetail">
                            <div style="margin:5px 0;"><span class="label">* </span>视频短信发送必须含签名信息</div>
                            <form class="layui-form" action="">
                                <div class="layui-form-item">
                                    <div class="layui-input-block" style="margin-left: 0">
                                        <select name="signature" lay-filter="signature" id="signature">
                                        </select>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="addContent items">
                        <div class="topical">添加文本</div>
                        <div>
                            <textarea name="" id="messageTextarea" cols="30" rows="10" placeholder="请输入短信内容" maxlength="100"></textarea>
                        </div>
                    </div>
                    <div class="addPictures items">
                        <div class="topical">添加图片</div>
                        <div class="topicalDetail">
                            <div><span class="label">* </span>请上传【图片格式】为jpg、jpeg、gif、bmp、png的图片文件</div>
                        </div>
                        <button type="button" class="layui-btn layui-btn-normal uploadPicture" style="margin-top: 10px;">本地上传</button>
                        <div class="preview">
                            <div class="addPicture">
                                <i class="layui-icon" style="font-size: 30px; color: #333;">&#xe654;</i>
                                <p>上传图片</p>
                            </div>
                            <div class="filePicture uploadPicture"></div>
                        </div>
                    </div>
                    <div class="addVideos items">
                        <div class="topical">添加视频</div>
                        <div class="topicalDetail">
                            <div><span class="label">* </span>建议上传2MB以内的视频文件，【视频格式】为3gp、mp4、amr、mpeg的格式文件。</div>
                            <div><span class="label">* </span>上传成功后，服务器将视频自动转码成设备可识别的格式，此过程耗时约30～60秒。</div>
                        </div>
                        <button type="button" class="layui-btn layui-btn-normal uploadVideo" style="margin-top: 10px;">本地上传</button>
                        <div class="preview">
                            <div class="addVideo">
                                <i class="layui-icon" style="font-size: 30px; color: #333;">&#xe654;</i>
                                <p>上传视频</p>
                            </div>
                            <div class="fileVideo uploadVideo"></div>
                        </div>
                        <!--										<div class="videoDescribe">-->
                        <!--											<div class="describe">请添加视频描述</div>-->
                        <!--											<input type="text" placeholder="请输入...">-->
                        <!--										</div>-->
                    </div>
                    <div class="addFrequencys items">
                        <div class="topical">添加音频</div>
                        <div class="topicalDetail">
                            <div><span class="label">* </span>请上传【音频格式】为AAC、MP3的音频，文件大小不能超过2M。</div>
                        </div>
                        <button type="button" class="layui-btn layui-btn-normal uploadAudio" style="margin-top: 10px;">本地上传</button>
                        <div class="preview">
                            <div class="addFrequency">
                                <i class="layui-icon" style="font-size: 30px; color: #333;">&#xe654;</i>
                                <p>上传音频</p>
                            </div>
                            <div class="fileFrequency uploadAudio"></div>
                        </div>
                        <!--										<div class="videoDescribe">-->
                        <!--											<div class="describe">请添加音频描述</div>-->
                        <!--											<input type="text" placeholder="请输入...">-->
                        <!--										</div>-->
                    </div>
                </div>
                <!--								<div class="set">-->
                <!--									<div>-->
                <!--										<button type="button" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal">提交审核</button>-->
                <!--										<button type="button" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-primary">重置内容</button>-->
                <!--									</div>-->
                <!--								</div>-->
            </div>
        <form class="layui-form layui-form-pane">
            <div class="layui-form-item">
                <button class="layui-btn layui-btn-normal" id="commit" lay-submit
                        lay-filter="commit">提交</button>
            </div>
        </form>
    </div>
</div>
</body>
</html>